package kr.hyunist.androidcomplete02saeildamil.ch20;

import kr.hyunist.androidcomplete02saeildamil.*;
import android.app.*;
import android.content.*;
import android.os.*;
import android.view.*;
import android.widget.*;

public class Ch20Activity extends ListActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
				this, R.array.chapter20, android.R.layout.simple_list_item_1);
		setListAdapter(adapter);

	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		Intent intent = null;
		
		switch(position){
		case 0:
			intent = new Intent(this, FragmentTest.class);
			break;
		case 1:
			intent = new Intent(this, FragmentManagerTest.class);
			break;	
		case 2:
			intent = new Intent(this, ListFragmentTest.class);
			break;	
		case 3:
			intent = new Intent(this, WordListTest.class);
			break;
		case 4:
			intent = new Intent(this, DialogFragmentTest.class);
			break;	
		case 5:
			intent = new Intent(this, DialogStyleThemeTest.class);
			break;	
		case 6:
			intent = new Intent(this, MultiPaneWidthTest.class);
			break;
			
		case 7:
			intent = new Intent(this, MultiPaneWidthTest2.class);
			break;
		}

		startActivity(intent);
	}
	
	
}